<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html style="width:100%;height:100%;">
<head>
</head>
<body onload="javascript:show();" style="width: 100%;height:100%;">
	<div style="width: 100%;height:100%;text-align:center;">
		<div id="display" style="width:90%;height:100%;text-align:center;margin:auto;">
			<img alt="" src="" id="displayIm" >
		</div>
	</div>
<script>
function show(){
	var ele=window.location;
	var fileId=ele.search.replace("?","");
	fileId=fileId.replace("file=","");
	if(fileId.indexOf("_im")!=-1){
		document.getElementById("displayIm").src="<%=request.getContextPath()%>/preview/file/previewOtherFile?fileId="+
				fileId.replace("_im","");
	}else if(fileId.indexOf("_tx")!=-1){
		document.getElementById("display").innerHTML="<iframe style='width:100%;height:100%;border:none;' src='<%=request.getContextPath()%>/preview/file/previewOtherFile.htm?fileId="+
				fileId.replace("_tx","")+"' ></iframe>";
	}else{
		document.getElementById("display").innerHTML="文件错误";
	}
	
}

</script>
</body>
</html>